package com.loopy.servlet;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.IOException;

public class HiServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session = request.getSession();
        session.setAttribute("k1","属性值是k1");
        session.setAttribute("k1","属性值是k2");
        session.removeAttribute("k1");
    }
}
